package com.hzmg.discovery;

import akka.actor.typed.ActorSystem;
import com.hzmg.support.util.NameUtils;

/**
 * 服务发现客户端
 *
 * @author Yukoo
 */
public class DiscoveryClient {

    public DiscoveryClient(String appName) {
        startDiscoveryClient(appName);
    }

    public void startDiscoveryClient(String appName) {
        ActorSystem<String> system = ActorSystem
                .create(DiscoveryClientRouteDefinitionLocator.create(), NameUtils.normalizeActorSystemName(DiscoveryClient.class));
        system.tell(appName);
    }
}
